package zoo.member.admin.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.support.SqlSessionDaoSupport;

import zoo.member.admin.domain.AdminCommand;
import zoo.member.domain.MemberCommand;

public class AdminDaoImpl extends SqlSessionDaoSupport implements AdminDao{

	@Override
	public AdminCommand selectAdmin(String ma_name) {
		AdminCommand command = (AdminCommand)getSqlSession().selectOne("selectAdmin",ma_name);
		return command;
	}

	@Override
	public List<MemberCommand> list(Map<String, Object> map) {
		List<MemberCommand> list = getSqlSession().selectList("selectList",map);	
		return list;
	}
	
	@Override
	public int getRowCount(Map<String, Object> map) {
		return (Integer)getSqlSession().selectOne("selectCount",map);
	}

	@Override
	public MemberCommand selectMember(String userid) {
		MemberCommand member = (MemberCommand)getSqlSession().selectOne("selectMember", userid);
		return member;
	}

}
